from datetime import datetime


from apps.model.dbTable import txUsersModel

def baseCartUserAddData(db):
    """
    用户基础资料新增
    :param db:
    :return:
    """
    obj = txUsersModel.query.filter_by(username="root").first()
    if obj is None:
        dataObj = {}
        dataObj["id"] = '000000'
        dataObj["username"] = "root"
        dataObj["password"] = "cm9vdA=="
        dataObj["user_type"] = 1
        cartUser = txUsersModel(**dataObj)
        db.session.add(cartUser)
        db.session.commit()
    return


def baseAddData(db):
    baseCartUserAddData(db)

